package com.kuaimacode.kframework.wechat.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Date;

@Controller
@RequestMapping("/")
public class IndexController {
	
	
    @ApiOperation(value = "获取服务器时间")
    @GetMapping("")
    public ResponseEntity<?> Home(){
        return ResponseEntity.status(HttpStatus.OK).body(new Date());
    }
	

    @ApiOperation(value = "获取服务器时间")
    @GetMapping("/time")
    public ResponseEntity<?> getTime(){
        return ResponseEntity.status(HttpStatus.OK).body(new Date());
    }
}
